package com.boge.auth.param;

import lombok.Builder;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;

@Getter
@Setter
@ToString
@Builder
public class SysDeptParam {

    private Integer id;

    @NotBlank(message = "部门名称不能为空")
    @Length(max = 20, min = 2, message = "部门名称长度必须在2-20个字之间")
    private String name;

    //给定默认值，防止传递的为空值，进数据库查询出错
    private Integer parentId = 0;

    @NotNull(message = "展示顺序不能为空")
    private Integer seq;

    @Length(max = 200, message = "备注的长度不能超过200个字")
    private String remark;

}
